﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NewsMine.DomainObjects;

namespace NewsMine.FeedRepository
{
    public interface IFeedDataProvider
    {

        //Add the feed to the repository ( one / more).



        //Update the Feed items with missing information and user information.



        //Get the feeds by

        // By web site

        // By website and category

        // By website and category, also keywords

        // By Category 

        // By Category and keywords

        // By Context ( websites, categories, locations, keywords, user preferences)

        void AddFeed(MFeed feed);
        
        void EditFeed(MFeed feed);

        bool IsFeedUrlIsExists(string url);

        MFeed GetFeedByUrl(string url);
        MFeed GetFeedByID(int feedID);
        List<MFeed> GetFeedsByDomain(string domain);
        
        void DisableFeed(MFeed feed);

        void AddFeedItems(MFeed feed);

        void AddFeedItems(MFeed feed, List<MFeedItem> feedItems);
        void AddFeedItem(MFeed feed, MFeedItem feedItem);

        void EditFeedItem(MFeedItem feedItem);

        bool IsFeedItemIsExists(MFeedItem feedItem);
        List<MFeedItem> GetFeedItemsByFeedID(int feedID,int maxRecords);
        List<MFeedItem> GetFeedItemsByFeedID(int feedID,DateTime cutOffTime);
        List<MFeedItem> GetFeedItemsByFeedItemIDs(string feedItemIDs);
        MFeedItem GetFeedItemsByFeedItemID(int feedID,int feedItemID);

    }
}
